/*
 * Copyright @ 2025 weili23
 * com.example.ai 11:35
 * All right reserved.
 */

package com.example.ai;

import com.example.ai.assistant.ChatMemoryAssistant;
//import com.example.ai.assistant.SeparateChatAssistant;
import dev.langchain4j.service.spring.AiService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @desc:会话记忆
 * @author: weili23
 * @createTime: 2025/4/29 11:35
 * @version: v1.0
 */
@SpringBootTest
public class ChatMemory {
    @Autowired
    private ChatMemoryAssistant chatMemoryAssistant;
    @Autowired
    //private SeparateChatAssistant separateChatAssistant;
    @Test
    public void test() {
        String chat = chatMemoryAssistant.chat("你知道我是谁吗");
        System.out.println(chat);
        String chat2 = chatMemoryAssistant.chat("你知道我是谁了吗");
        System.out.println(chat2);
    }


    @Test
    public void test2() {
        /*String chat = separateChatAssistant.chat(1,"你好我是张三，很高兴认识你");
        System.out.println(chat);
        String chat2 = separateChatAssistant.chat(1,"你知道我是谁了吗");
        System.out.println(chat2);
        String chat3 = separateChatAssistant.chat(2,"你知道我是谁了吗");
        System.out.println(chat3);*/
       /* String chat = separateChatAssistant.chat(1,"今天是几号");
        System.out.println(chat);*/
    }

}
